<?php
namespace PHPMailer;

use PHPMailer\src\PHPMailer;

class Mail 
{
	
	public static function send($email,$title,$content)
	{

		$mail = new PHPMailer(true);                             
		try {

		    // $mail->SMTPDebug = 2;

		    $mail->isSMTP();

		    $mail->Host = 'smtp.qq.com';//邮件服务器地址

		    $mail->SMTPAuth = true;                               
		    $mail->Username = '113664000@qq.com'; //帐号                
		    $mail->Password = 'yburllffqnwncaja'; //密码                           
		    $mail->SMTPSecure = 'ssl'; //协议

		    $mail->Port = 465; //端口

		    // 链接邮件服务器



		    $mail->setFrom('113664000@qq.com', config('site_name'));

		    $mail->addAddress($email);

		    $mail->isHTML(true);

		    $mail->Subject = $title;
		    $mail->Body    = $content;

		    $mail->send();

		    return true;

		} catch (Exception $e) {
		    return false;
		}
	}
}